= simple_form_for parent? ? [parent, resource] : resource do |f|
  .row-fluid
    .span6
      = f.input :file, :as => :file
    .span6
      = f.input :encoding, :collection => encoding_collection
  = f.fields_for :booking_import do |i|
    .row-fluid
      .span6
        = i.input :type, :collection => booking_import_type_collection
      .span6
        = i.association :account

    - if parent?
      - if parent
        - f.object.object = parent
        = f.input :object_id, :as => :hidden
        = f.input :object_type, :as => :hidden
      - else
        = f.input :object, :collection => parent_class.all

  .form-actions
    = f.button :submit
